var http = require('http');
var querystring = require('querystring');

var postdata = querystring.stringify({
	"name":"ramesh",
	"password":"password3",
	"profession":"clerk",
	"id":5
});


var options = {
	host:'localhost',
	port:3000,
	path:'/register',
	method:'POST'
};

var req = http.request(options, function(res){
	console.log("STATUS:" + res.statusCode);
	console.log("HEADERS:" + JSON.stringify(res.headers));
	res.setEncoding('utf8');
	res.on('data', function(chunk){
		console.log('BODY:' + chunk);
	});
});
console.log("req.write");
req.write(postdata);
console.log("req.end");
req.end();
